NetCloak 2.5 User's Guide

Time and Date Commands


<INSERT_TIME offset format>

INSERT_TIME will place the current time, as text, into your document. The time will be formatted using the time format set in the Date & Time control panel. The time will be inserted in either short or long form according to the current setting of the "Short Time" menu option in NetCloak.

Either an offset or format may be specified without the other, but if both are specified, the offset must be the first parameter.

You may override the menu option by specifying "SHORT" or "LONG" as the format parameter in the command.

Here is an example:

     The current time is <INSERT_TIME LONG>.

In this case, the time will be inserted into the page, and include seconds.

The offset parameter is a positive or negative number that specifies the number of hours and/or tenths difference between the time set on the Web server and the time that should be displayed. In other words, an offset of +2 will display the current time plus two hours. An offset of -4 would display the time less four hours. This can be used to show times that vary between time zones.

For Example:

     The time in Chicago is <INSERT_TIME SHORT>.
     The time in California is <INSERT_TIME -2 SHORT>.
     The Time in New York is <INSERT_TIME +1 SHORT>.

A plus ("+") or minus ("-") sign is always required when specifying an offset.

<HIDE_TIME time1 time2 ...>

The HTML text that follows this command will be hidden during the specified time intervals. Time intervals can be one minute, ten minutes or one hour. Hours are specified as on a 24-hour clock. For example:

     <HIDE_TIME 21>

This will hide text following it for the one hour interval between 9:00:00 PM and 9:59:59 PM. Leading zeros for single digits are required, and multiple times may be specified.

Intervals of minutes or tens of minutes work similarly; specifying 10:2 includes the ten minute interval from 10:20:00 until 10:29:59, and 10:48 includes the one minute interval from 10:48:00 until 10:48:59. So, to block access to the text block from 8:00 to 8:30 am, you would use the command:

     <HIDE_TIME 08:0 08:1 08:2>

<SHOW_TIME time1 time2 ...>

Any HTML text that follows this command will be visible to users during the specified times. The SHOW_TIME command is analogous to HIDE_TIME and its syntax is the same.

<INSERT_DATE offset format>

The INSERT_DATE command will place the current date, as text, into your document at the specified point.

The optional "offset" parameter allows you to display the date offset from the date and time set on the server. This is useful for displaying the date in another time zone. The offset must be preceded by a "+" for a forward offset or "-" for a backwards offset, and is specified in hours and tenths of hours. For example,

     Today is <INSERT_DATE>     In 30 minutes it will be <INSERT_DATE +.5>     And yesterday was <INSERT_DATE -24>

The format of the date that NetCloak inserts will depend upon the date format you have selected in the Date & Time control panel, as well as the Short Date setting in the Configuration menu of NetCloak. See the section "Configuring NetCloak" for more information.

You can override the default format setting by specifying either "SHORT" or "LONG" as the "format" parameter. The Date & Time control panel allows you to configure two date formats: long and short, and the "format" parameter allows you to select which should be used to display the date. The format may be specified without specifying an offset.

Here is an example:

     The current date is <INSERT_DATE SHORT>.
     Tomorrow will be <INSERT_DATE +24 SHORT>.

This will display the current date with the "Short" date format specified in the Date & Time control panel. For the default U.S. date format, this will result in:

     The current date is 10/31/97.
     Tomorrow will be 11/1/97.

<HIDE_DATE begin end>

HIDE_DATE allows you to hide portions of your page during the date range defined by the "begin" and "end" dates. To work properly, the "begin" date must be before the "end" date. Only one begin and end date may be specified.

For example, to suppress a section of a page during 1998, you could use:

     <SHOW><HIDE_DATE 1/1/98 1/1/99>     This will be hidden during 1998.
     <SHOW>

Dates must be specified using the short date format configured in your system's Date & Time control panel. In the US, this format is usually set to "mm/dd/yy". Partial dates, such as "1997", "11/98" or "04/15", or wildcards are not allowed. Leading zeros for single-digit months or days are optional, as are the century digits of the year.

An asterisk (*) can be used as the "begin" value to mean "any date earlier than". Using an asterisk for the "end" value means "any date after". An example is shown below, and another is included in the INSERT_COUNTDOWN section later.

NetCloak does take the time of day into account when the HIDE_DATE command is used. You can include a specific time of day by following the date with an at sign ("@") and the time. For example,:

     <SHOW><HIDE_DATE * 12/14/98@5:34>     Hidden until 12/14/98 at 5:34 a.m. 
     <SHOW>

It is important to note that when dates are specified without a time, the time is actually computed as midnight the morning of the date specified. In other words, a date of "1/1/98" technically specifies the stroke of midnight on New Year's eve, at the end of 1997 and the beginning of 1998. So "1/1/98" and "12/31/97@24:00" refer to the exact same time.

As a final example, to hide or show a section of a page on a single date, you must either use the next date as the "end" parameter (meaning "midnight, the morning of the next day") or "@24:00" as the time for the "end" parameter.

     <HIDE><SHOW_DATE 12/14/98 12/14/98@24:00>     Happy Birthday, John!
     <SHOW>

<SHOW_DATE begin end>

<SHOW_DATE> allows you to show portions of your page during the date range defined by the "begin" and "end" dates.

In all other respects, SHOW_DATE is the same as the HIDE_DATE command; see that section.

<INSERT_COUNTDOWN_WDHM date@time "Weeks" "Days" "Hours" "Minutes">

Counting down to a specified day or time is handy when you have some event approaching that you would like to highlight. For example, you might want to count down the days until a big sale, or a mid-term exam, or the roll out of a new feature of your Web site. Using the command is simple, just include the command and specify the date (and optionally the time) you would like to countdown to. For example:

     The new century starts in
     <INSERT_COUNTDOWN_WDHM 01/01/2000>.

The INSERT_COUNTDOWN command has several variations, specified by the "WDHM" at the tail end of the command. The letters "WDHM" stand for "Weeks", "Days", "Hours", and "Minutes".

Any combination of these characters are allowed, and they give you control over exactly what is displayed. For example, to countdown the hours until Christmas of 1998, you would use:

     Christmas '98 is in
     <INSERT_COUNTDOWN_H 12/25/1998>.

You may also countdown to a specific time (with time expressed in military format), as in:

     I'll have Thanksgiving dinner in <INSERT_COUNTDOWN_M 11/28/1998@16:00>     <P>     Too many minutes?  How about <INSERT_COUNTDOWN_DM 11/28/98@16:00>?

Valid dates are between January 1st, 1904 and January 1st, 2030.

Also, the INSERT_COUNTDOWN command will also count up, if the date (and or time) specified is in the past.

For example...

     My son is <INSERT_COUNTDOWN_WD 5/6/93> old, and my daughter is <INSERT_COUNTDOWN_WD 12/2/94> old.

By default, NetCloak uses the labels "Weeks", "Days", "Hours" and "Minutes" when displaying the countdown. In the example above, the page would appear:

     My son is 231 Weeks 5 Days old, and my daughter is 149 Weeks 4 Days old.

However, you can change the labels by specifying the label parameters. If you choose to include your own labels, you should specify all four, in order. In the example above, we can use lower case labels and include a comma after "weeks" by changing the command to:

     My son is <INSERT_COUNTDOWN_WD 5/6/93 "weeks," "days" "hours" "minutes"> old,
     and my daughter is <INSERT_COUNTDOWN_WD 12/2/94 "weeks," "days" "hours" "minutes"> old.

Notice that even though hours and minutes won't be displayed, they are included for good form and consistency.

To avoid having the counter reverse itself and begin counting upward, you may want to use the SHOW_DATE and HIDE_DATE commands. For example:

     <HIDE>     <SHOW_DATE * 12/25/98>     Christmas is in
     <INSERT_COUNTDOWN_H 12/25/1998>.
     <HIDE>     <SHOW_DATE 12/25/98 12/25/98@24:00>     Merry Christmas!
     <HIDE>     <SHOW_DATE 12/26/98 *>     Christmas is in
     <INSERT_COUNTDOWN_H 12/25/1999>.

<INSERT_DAY offset>

The INSERT_DAY command will place the current day of the week, as text, into your document. NetCloak will insert the day in the format selected in the Date & Time control panel. Here is an example:

     Today is <INSERT_DAY>.

For U.S. date format, this would appear in the page like this:

     Today is Friday.

As in the INSERT_DATE and TIME commands, the "offset" parameter is an optional parameter that specifies a number of hours and tenths to offset the day. Note that the offset is not specified in days, because you may want to show the day in a different time zone. Only one offset may be specified.

<HIDE_DAY day1 day2 ...>

This command hides the HTML text on the specified day(s). The days are specified as the first three characters of the day, and depend on the date format selected in the Date & Time control panel on the server. For U.S. format, the valid days are MON, TUE, WED, THU, FRI, SAT, SUN. As with most other commands, multiple days may be specified

This example will hide text during the work week:

     <HIDE_DAY MON TUE WED THU FRI>

<SHOW_DAY day1 day2 ...>

This command shows the HTML text following it on the specified days. In all other respects, SHOW_DAY is the same as the HIDE_DAY command.


[ Command Listing | Table Of Contents ]

Copyright © 1996-7 Maxum Development Corporation
820 South Bartlett Road - Suite 104
Streamwood, IL 60107
http://www.maxum.com/